<template>
  <a-modal 
    :visible="visible"
    :title="title"
    :maskClosable="false"
    :destroyOnClose="true"
    :keyboard="false"
    @cancel="closeModal()"
    width="800px">
    <FreightTemplate></FreightTemplate>
    <template slot="footer">
      <a-button @click="closeModal()">关闭</a-button>
    </template>
  </a-modal>
</template>
<script>
import FreightTemplate from '@/views/menuPage/product/freight/template';

export default {
  components:{
    FreightTemplate
  },
  props: {
    visible:{
      type:Boolean,
      default:false,
    }
  },
  computed: {
    title () {
      return '新建运费模板'
    },
    // userInfo(){
    //   return this.$store.getters.userInfo || {};
    // }
  },
  data () {
    return {
        // columns:[
        //     { title: 'groupName', dataIndex: 'groupName', key: 'groupName' },
        // ],
        // dataSource:[],
        // groupList:[],
        // group:'',
    }
  },
  watch: {
    
  },
  created(){
    //this.getGroupList();
  },
  mounted () {
  },
  methods: {
    // async getGroupList(){
    //   let res=await this.$get('/goods/group/tree',{
    //     shopId:this.userInfo.shopId
    //   })
    //   if(res && res.returnCode=='1000'){
    //     this.groupList=res.dataInfo || [];
    //   }
    // },
    // handleSubmit () {
    //   console.log(this.group)
    //   this.$emit('submit',this.group);
    // },
    
    closeModal (freshTable) {
      this.$emit('cancel', freshTable)
    }
  }
}
</script>